import React, { forwardRef } from 'react';
import * as ProgressPrimitive from '@radix-ui/react-progress';

// Progress组件
const Progress = forwardRef<HTMLDivElement, ProgressPrimitive.ProgressProps>(({ className, value, ...props }, ref) => (
  <ProgressPrimitive.Root
    ref={ref}
    className={`relative h-2 w-full overflow-hidden rounded-full bg-secondary ${className}`}
    value={value}
    {...props}
  >
    <ProgressPrimitive.Indicator
      className="h-full w-full flex-1 bg-primary transition-all"
    />
  </ProgressPrimitive.Root>
));

Progress.displayName = 'Progress';

export { Progress };